1. Field
One embodiment of the invention relates to a video encoding apparatus and video encoding method.
2. Description of the Related Art
A video encoding technique required to transmit and store a video signal to have a smaller data size has been put into practical use, as represented by, e.g., the MPEG2 video standard.
In the MPEG2 video standard, one image is divided into blocks each of 8×8 pixels, discrete cosine transformation (DCT) as one of orthogonal transformations is applied to respective blocks, and obtained DCT coefficients are quantized to attain variable-length encoding, thus compressing the image. Using motion-compensated prediction together, the encoding efficiency can be improved using correlation of an image in the time axis direction.
The motion-compensated prediction includes intra-frame prediction and inter-frame prediction. In video encoding, the inter-frame prediction predicts a motion by referring to an encoded frame, and can normally encode video data with higher efficiency than the intra-frame prediction.
By setting quantization parameters used in quantization according to visual characteristics, degradation of image quality due to video encoding can be eliminated.
Jpn. Pat. Appln. KOKAI Publication No. 2006-129067 discloses a video encoding apparatus, which eliminates degradation of image quality due to quantization using an adaptive quantization method which calculates activities of macroblocks (blocks) each including a predetermined number of pixels, and sets smaller quantization parameters as activities are low.
The video encoding apparatus disclosed in Jpn. Pat. Appln. KOKAI Publication No. 2006-129067 adopts the adaptive quantization method, which sets smaller quantization parameters for a flat part based on the activities of macroblocks. In the adaptive quantization method based on activities, the image quality of a flat region where degradation of subjective image quality tends to stand out can be improved.
In the inter-frame prediction, degradation of subjective image quality tends to stand out in a region with a large predictive residual. However, since there is no correlation between the activities and predictive residuals, it is difficult for the adaptive quantization method based on activities to improve the image quality of a region with a large predictive residual. Therefore, implementation of a novel technique for eliminating degradation of subjective image quality in a region with a large predictive residual is demanded.